import request from '@/utils/request.js'

//获取当前教师的班级
export const findClassroomByTeacherId=()=>{
   return request.get('/teacher/findGradeByTeacherId')
}

//创建班级
export const insterClass=(className)=>{
   return request.post('/teacher/createClassroom?className='+className)
}


//删除班级
export const deleteClass=(classId)=>{
   return request.delete('/teacher/deleteClassroom/'+classId)
}



//修改班级
export const updateClass=(classId,className)=>{
   return request.put('/teacher/updateClassroom?classId='+classId+'&className='+className)
}

//查询班级
export const findClassroomByClassId=(classId)=>{
   return request.get('/teacher/findClassroomBysearch?className='+classId)
}
// 查询所有标签专业
export const selectAllDirection = () => {
   return request.get("/subjectlabel/selectAll")
}
// 添加标签
export const addLabel = (label) => {
   return request.post("/subjectlabel/insertLabel", label)
}
// 修改标签
export const updateLabel = (label) => {
   return request.put("/subjectlabel/updateLabel", label)
}
// 删除标签
export const deleteLabel = (id) => {
   return request.delete("/subjectlabel/deleteByID/"+id)
}
// 查询所有老师专业
export const selectAllTeacherMajor = () => {
   return request.get("/teachermajor/selectAllGl")
}
// 查询所有学校
export const selectAllSchool = () => {
   return request.get("/teachermajor/selectAllSchool")
}
// 新增老师专业
export const addTeacherMajor = (teacherMajor) => {
   return request.post("/teachermajor/insertUser", teacherMajor)
}
// 查询单个老师的信息专业
export const selectAllByid = (id) => {
   return request.get("/teachermajor/selectByIdall/"+id)
}
// 修改老师专业
export const updateTeacherMajor = (teacherMajor) => {
   return request.post("/teachermajor/updateUser", teacherMajor)
}

// 查询老师专业
// export const selectAllDirections = () => {
//    return request.post("/teachermajor/selectAllDirection")
// }
// 查询所有老师
export const selectAllTeachers = (mid) => {
   return request.get("/teachermajor/selectAllTeacher/"+mid)
}
// 专业组组长
export const selectAllGroupLeader = () => {
   return request.get("/teachermajor/selectteacherGl")
}
// 添加专业
export const addDirections = (direction) => {
   return request.post("/teachermajor/addDirection/"+ direction)
}
// 修改专业
export const updateDirections = (direction) => {
   return request.put("/teachermajor/updateDirection", direction)
}

// 修改教研组组长
export const updateGroupLeader = (id,mid) => {
   return request.put("/teachermajor/updateTeacheringResearchId/"+id+"/"+mid)
// 查询专业名称通过id
}
export const selectSubjectLabelById = (id) => {
   return request.get("/teachermajor/selectDirectionById/"+id)
}


//根据专业id查询老师
export const selectTeacherByMarjor = (id) => {
   return request.get("/teachermajor/selectTeacherByMarjorId/"+id)
}

export const deleteDirections = (id) => {
   return request.delete("/teachermajor/deleteTeacherMajord/"+id)
   }
// 删除老师专业
export const deleteTeacherMajorById = (id) => {
   return request.delete("/teachermajor/deleteTeacherMajor/"+id)
}
